package com.g0dkar.leet.core.model.loaders;

import com.g0dkar.leet.core.configuration.loaders.LeetConfigurationClassLoader;
import com.g0dkar.leet.core.configuration.loaders.LeetConfigurationXmlLoader;

/**
 * Load a JHeat Model Class (<code>&lt;T&gt;</code>) based on some kind of object (<code>&lt;L&gt;</code>).
 * @author Rafael M. Lins
 *
 * @param <T> The JHeat Model Class which will be created
 * @param <L> The Object from whom the Model Class will be created
 * 
 * @see LeetConfigurationXmlLoader
 * @see LeetConfigurationClassLoader
 * @see ClassMappingLoader
 */
public interface ModelLoaderInterface<T, L> {
	
	/**
	 * Load a JHeat Model Class (<code>&lt;T&gt;</code>) based on some kind of object (<code>&lt;L&gt;</code>).
	 * @param l The object which the Model Class will be loaded (or null if it does not need something to load from)
	 * @return A JHeat Model Class.
	 * @see LeetConfigurationXmlLoader#load(org.jdom.Element)
	 * @see LeetConfigurationClassLoader#load(Object)
	 * @see ClassMappingLoader#load(Class)
	 */
	public T load(L l);
}
